﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<!-- 网页头部分布视图 -->
@Html.Partial("~/Views/Shared/HouTai_Header.cshtml")
<body>
    <!-- 网页导航菜单分布视图 -->
    @Html.Partial("~/Views/Shared/HouTai_DaoHang.cshtml")

    <div class="container">
        <div class="row">

            <!-- 网页左侧菜单分布视图 -->
            @Html.Partial("~/Views/Shared/HouTai_Left_Menu_Course.cshtml")
            <div class="col-md-10">
                <div class="page-header clearfix">
                    <h1 class="pull-left">班级管理</h1>
                    <div class="pull-right">
                        <a class="btn btn-success btn-sm" href="/Class/ClassCreate" target="blank">创建班级</a>

                    </div>
                </div>

                <ul class="nav nav-tabs ">
                    <li class="active">
                        <a href="/Class/ClassRoom">班级管理</a>
                    </li>
                    <li>
                        <a href="/Class/ClassTui">班级推荐</a>
                    </li>
                </ul>



                <form id="message-search-form" class="form-inline well well-sm" action="/Class/ClassRoom" method="post" novalidate="">
                    <div class="form-group">
                        <input class="form-control" placeholder="训练营名称" name="name" value="" type="text">
                    </div>
                    <button class="btn btn-primary">搜索</button>
                </form>
                <table class="table table-striped table-hover" id="classroom-table">
                    <thead>
                        <tr>
                            <th width="40%">训练营名称</th>
                            <th>课程数</th>
                            <th>学员数</th>
                            <th>价格</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>

                        @foreach (var item in ViewBag.lst as List<LeEdu.MODEL.ClassTable>)
                        {
                            <tr id="classroom-table-tr-2">
                                <td>
                                    <strong>
                                        <a target="_blank" href="/Class/ClassManage/@item.ClassTableId">@item.CTName</a>
                                    </strong>
                                    <br>
                                    <span class="text-muted text-sm">
                                        @*分类：*@
                                        
                                            @*@foreach (var item2 in ViewBag.cc as List<LeEdu.MODEL.Course_Class>)
                                            {
                                                if (item2.ClassTableId == item.ClassTableId)
                                                {
                                                   
                                                        @item2.Courses.College.CollegeName
                                                 
                                                }

                                            }*@
                                    
                                    </span>
                                    @*推荐序号不存在的不让显示*@
                                    @if (item.ClassReNumber != null && item.ClassReNumber != 0)
                                    {
                                        <span class="label label-default">荐:@item.ClassReTime / 序号:@item.ClassReNumber</span>

                                    }

                                </td>
                                <td>
                                    0

                                </td>
                                <td>
                                    1
                                </td>
                                <td>
                                    <span style="color: #F40; ">
                                        @item.CTPrice 元
                                    </span>
                                    &nbsp;


                                    <span style="font-size: 13px;color: #666;">
                                        原价 @item.CTPrice 元
                                    </span>

                                </td>
                                <td>
                                    <span style="color: #090;">@(item.ClassState == 1 ? "已发布" : "关闭")</span>
                                </td>
                                <td>
                                    <div class="btn-group">
                                        <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
                                            编辑
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu">
                                            <li><a href="/Class/ClassManage/@item.ClassTableId" target="_blank"><span class="glyphicon glyphicon-edit"></span> 管理训练营</a></li>

                                            @{

                            if (item.ClassReNumber != 0)
                            {

                                <li><a class="cancel-recommend-classroom" href="/Class/QuXiao/@item.ClassTableId" title="取消推荐"><span class="glyphicon glyphicon-hand-right"></span> 取消推荐</a></li>
                            }
                            else
                            {
                                <li><a href="/Class/ClassTuiShe/@item.ClassTableId" data-toggle="modal" data-target="#myModal" title="训练营推荐"><span class="glyphicon glyphicon-hand-right"></span>推荐</a></li>
                            }


                            if (item.ClassState == 1)
                            {

                                <li><a href="/Class/GuanBi/@item.ClassTableId" class="close-classroom" title="关闭训练营(@item.CTName)" data-url="/admin/classroom/2/close"><span class="glyphicon glyphicon-off"></span>@(item.ClassState == 1 ? "关闭训练营" : "发布") </a></li>
                            }
                            else
                            {
                                <li><a href="/Class/Fabu/@item.ClassTableId" class="close-classroom" title="发布训练营(@item.CTName)" data-url="/admin/classroom/2/close"><span class="glyphicon glyphicon-off"></span>@(item.ClassState == 1 ? "关闭训练营" : "发布") </a></li>
                            }
                                            
                            }

                                        </ul>
                                    </div>
                                </td>
                            </tr>
                        }



                    </tbody>
                </table>
                @{
                    <ul class="pagination ">
                        <li @*class="active"*@><a href="/Class/ClassRoom?pageIndex=1&&name=@(ViewBag.name)">首页</a></li>
                        <li><a href="/Class/ClassRoom?pageIndex=@((ViewBag.pageIndex - 1) < 1 ? "1" : (ViewBag.pageIndex - 1))&&name=@(ViewBag.name)">上一页</a></li>

                        @for (int i = 1; i <= ViewBag.pageCount; i++)
                        {
                            <li><a href="/Class/ClassRoom?pageIndex=@i&&name=@(ViewBag.name)">@i</a></li>
                        }

                        <li><a href="/Class/ClassRoom?pageIndex=@((ViewBag.pageIndex + 1) > ViewBag.pageCount ? ViewBag.pageCount  : (ViewBag.pageIndex + 1))&&name=@(ViewBag.name)"><i></i>下一页</a></li>
                        <li><a href="/Class/ClassRoom?pageIndex=@ViewBag.pageCount&&name=@(ViewBag.name)">尾页</a></li>
                    </ul>
                }

                <div class="pull-right">

                </div>

            </div>
        </div>
    </div>
    <!-- 设置推荐班级 -->

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">

            </div>
        </div>
    </div>

    <script>
        var app = {};
        app.debug = false;
        app.version = '6.9.3';
        app.httpHost = 'http://www.zhishile.com';
        app.basePath = '';
        app.theme = 'jianmo';
        app.themeGlobalScript = 'theme/global-script';
        app.jsPaths = { "common": "common", "theme": "\/themes\/jianmo\/js", "customwebbundle": "\/bundles\/customweb\/js", "customadminbundle": "\/bundles\/customadmin\/js", "topxiawebbundle": "\/bundles\/topxiaweb\/js", "topxiaadminbundle": "\/bundles\/topxiaadmin\/js", "classroombundle": "\/bundles\/classroom\/js" };

        app.crontab = '/common/crontab';

        var CKEDITOR_BASEPATH = app.basePath + '/assets/libs/ckeditor/4.6.7/';

        app.config = { "api": { "weibo": { "key": "" }, "qq": { "key": "" }, "douban": { "key": "" }, "renren": { "key": "" } }, "cloud": { "video_player": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/GrindPlayer.swf", "video_player_watermark_plugin": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/Watermake-1.0.3.swf", "video_player_fingerprint_plugin": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/Fingerprint-1.0.1.swf" }, "loading_img_path": "\/assets\/img\/default\/loading.gif?6.9.3" };

        app.arguments = {};
        app.controller = 'classroombundle/controller/classroom-admin/classroom';

        app.scripts = null;

        app.uploadUrl = '/file/upload';
        app.imgCropUrl = '/file/img/crop';
        app.lessonCopyEnabled = '0';

        app.mainScript = '/bundles/topxiaadmin/js/admin-app.js?6.9.3';
    </script>
    <script src="/assets/libs/seajs/seajs/2.2.1/sea.js?6.9.3"></script>
    <script src="/assets/libs/seajs/seajs-style/1.0.2/seajs-style.js?6.9.3"></script>
    <script src="/assets/libs/seajs-global-config.js?6.9.3"></script>
    <script>
        seajs.use(app.mainScript);
    </script>  <div id="modal" class="modal"></div>
    <div class="fixed-bar">
        <a href="/admin/feedback" target="_blank" class="icon-question-text feedback">
            <i class="es-icon es-icon-help"></i>
            <span>产品<br>反馈</span>
        </a>
    </div>


</body>
</html>
